home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / DLLCust_Files / FUNCTION / TRIANGLE.C < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-08  |  772 b   |  30 lines

  1. // Dynamic link library implementation of NeuroSolutions Function component for Triangle setting
  2.  
  3. #include "NSDLL.h" 
  4.  
  5. /***************************/
  6. /* Activation of component */
  7. __declspec(dllexport) NSFloat performFunction(
  8.     DLLData    *instance,    // Pointer to instance data (may be NULL)
  9.     NSFloat    x         // Current argument in radians
  10.     )
  11. {
  12.     return (NSFloat)(x<PI? x/PI: (-x + 2*PI)/PI);
  13. }
  14.  
  15. /******************************************/
  16. /* Management of instance data (OPTIONAL) */
  17. /*
  18. __declspec(dllexport) DLLData *allocFunction(
  19.     DLLData    *oldInstance    // Pointer to the last instance if reallocating
  20.     )
  21. {
  22.     DLLData *instance = NULL;
  23.     return instance;
  24. }
  25.  
  26. __declspec(dllexport) void freeFunction(DLLData *instance)
  27. {
  28.     freeDLLInstance(instance); 
  29. }
  30. */